<?php
include  __DIR__.'/common/common.php';
$data=mysqli_query($mysql,"SELECT COUNT(*) AS count FROM `brand`");//统计一共有多少条数据
$count=mysqli_fetch_assoc($data);//array ( 'count' => '106', )
$count=$count['count'];
$start=(($page-1)*10);//起始位置
$data=mysqli_query($mysql,"SELECT * FROM `brand`");
$count=ceil($count/10);
$arr=array();
while ($a=mysqli_fetch_assoc($data))
{
    $arr[]=$a;
}
mysqli_free_result($data);
echo json_encode(array(
    'data'=>$arr,
    'count'=>$count
));//json格式输出